"use strict"

/**
 * 青岛市采购网爬虫
 *  post请求
 */

var Base = require("./base");
var qd_spider = new Base();
qd_spider.name = "青岛市政府采购网";
qd_spider.page = 1;

qd_spider.getPageUrl = function() {
    return "http://zfcg.qingdao.gov.cn/mhxt/MhxtSearchBulletinController.zc?method=bulletinChannelRightDown&pageNo=1&pageSize=50&channelCode=sxqcg_cggg";
};

qd_spider.getItems = function($) {
    var items = [];
    $(".column ul li a").each(function(index, ele) {
        var e = $(ele);
        var item = {};
        item.title = e.attr("title");
        item.url = "http://zfcg.qingdao.gov.cn/" + e.attr("href");
        item.source = qd_spider.name;
        items.push(item);
    });
    return items;
};

exports = module.exports = qd_spider;
